package dao;

import domain.Order;
import domain.OrderGoods;
import org.apache.ibatis.annotations.Param;
import util.CompositeGoods;

import java.util.List;

public interface OrderDao {
    Order selectById(int id);

    int insert(int userId);

    int updateSum(int id, int sum);

    int updateState(Order order);

    int delete(int id);

    List<Order> selectAll();

    int addgoods(@Param(value = "orderID") Integer orderID, @Param(value = "goodsID") Integer goodsID, @Param(value = "number") Integer number);

    int deleteGoods(@Param(value = "goodsID") Integer goodsID, @Param(value = "orderID") Integer orderID);

    int updateGoods(@Param(value = "goodsID") Integer goodsID, @Param(value = "orderID") Integer orderID, @Param(value = "number") Integer number);

    List<OrderGoods> showAllgoods(Integer orderId);

    List<CompositeGoods> selectCompositeGoods(long id);

}
